Return to start page
Core/Interface/Library Cinematic Filter.j
1 library ALibraryCoreInterfaceCinematicFilter
2
3 /**
4 * @author KaTTaNa
5 * @todo Crashes the game?!
6 * @state unstable
7 */
8 function ShowGenericCinematicFilterForPlayer takes player user, real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
9 local player localPlayer = GetLocalPlayer()
10 if (localPlayer == user) then
11 call SetCineFilterTexture(tex)
12 call SetCineFilterBlendMode(bmode)
13 call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
14 call SetCineFilterStartUV(0, 0, 1, 1)
15 call SetCineFilterEndUV(0, 0, 1, 1)
16 call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
17 call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
18 call SetCineFilterDuration(duration)
19 call DisplayCineFilter(true)
20 endif
21 set localPlayer = null
22 endfunction
23
24 /// @author Tamino Dauth
25 function ShowBlackScreenCinematicFilterForPlayer takes player user, real duration returns nothing
26 local player localPlayer = GetLocalPlayer()
27 if (localPlayer == user) then
28 call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
29 call SetCineFilterBlendMode(BLEND_MODE_NONE)
30 call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
31 call SetCineFilterStartUV(0, 0, 1, 1)
32 call SetCineFilterEndUV(0, 0, 1, 1)
33 call SetCineFilterStartColor(255, 255, 255, 0)
34 call SetCineFilterEndColor(255, 255, 255, 0)
35 call SetCineFilterDuration(duration)
36 call DisplayCineFilter(true)
37 endif
38 set localPlayer = null
39 endfunction
40
41 /// @author Tamino Dauth
42 function ShowBlackScreenCinematicFilter takes real duration returns nothing
43 call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
44 call SetCineFilterBlendMode(BLEND_MODE_NONE)
45 call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
46 call SetCineFilterStartUV(0, 0, 1, 1)
47 call SetCineFilterEndUV(0, 0, 1, 1)
48 call SetCineFilterStartColor(255, 255, 255, 0)
49 call SetCineFilterEndColor(255, 255, 255, 0)
50 call SetCineFilterDuration(duration)
51 call DisplayCineFilter(true)
52 endfunction
53
54 endlibrary